package com.example.demo.mapper;

import com.example.demo.entity.Attraction;
import com.example.demo.entity.RecordCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;

import java.util.Date;
import java.util.List;

/**
 * @program: demo
 * @description:
 * @author: Lelouch
 * @create: 2024-09-04 15:46
 **/
@Mapper
public interface AttractionMapper {
    List<Attraction> list();

    List<Attraction> listByParams();

    int add(Attraction attraction);

    boolean changeAttraction(Attraction attraction);

    Attraction getAttractionById(Integer id);

    boolean deleteById(Integer id);

    Integer selectIdByName(String name);

    List<RecordCount> touristList(@Param("attractionId") Integer attractionId,
                                  @Param("startDate") Date startDate, @Param("endDate") Date endDate);
}
